package com.study.talk.module.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.study.talk.module.entity.UserInfo;
import com.study.talk.module.mapper.UserInfoMapper;
import com.study.talk.module.service.UserInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author thor
 * @since 2023-12-18
 */
@Service
@Slf4j
@Transactional
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements UserInfoService {

    @Autowired
    private UserInfoMapper userInfoMapper;

    @Override
    public List<UserInfo> getUserInfoListByUsername(String username) {
        QueryWrapper<UserInfo> wrapper = new QueryWrapper<>();
        wrapper.like("username",username);
        return list(wrapper);
    }
}
